// module.exports = file => require('@/views/' + file).default
// module.exports = file => () => import('@/views/' + file)

//不能用import，因为不会被catch捕捉
module.exports = function (file) {
  try {
    return require('@/views/' + file).default
  } catch(err) {
    console.log('not exist file:'+file)
  }
}

